package cn.itcast.config;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.io.IOException;

@Configuration
public class RestHighLevelClientConfig {

        @Bean
        public RestHighLevelClient client(){
            return new RestHighLevelClient(RestClient.builder(
                    HttpHost.create("http://192.168.71.130:9200")
            ));
        }










}
